<template>
<div :style="{ 'margin-top': top }">
  <div :style="{'padding-left': spacing,
        'padding-right': spacing,
        height: height,}" class="answerContest">
        <div class="contents">
      <p class="title">{{ contestName || "答题竞赛" }}</p>
      <p class="info">{{ contextSlogan || "竞赛对抗，磨练技能" }}</p>
    <div class="contentOptions">
      <section class="optionLeft">
        <div class="substance">
          <div class="line"></div>
          <img src="../../images/answerRank/answer_font1.png" alt="" />
          <p>{{context||'闯关赢积分'}}</p>
        </div>
      </section>
      <section class="optionRight">
        <div class="opRightF">
          <img src="../../images/answerRank/answer_font2.png" alt="" />
        </div>
        <div class="opRightS">
          <img src="../../images/answerRank/answer_font3.png" alt="" />
        </div>
      </section>
    </div>
    <div class="rank">
      <img src="../../images/answerRank/rankIcon.png" alt="" />
      排行榜
    </div>
    </div>
  </div>
  </div>
</template>
<script>
import mixins from "../mixins";
import mixin from "./mixins";
export default {
    mixins: [mixins, mixin],
  props: {
    option: {
      type: Object,
      default: {},
    },
    isInitData: {
      type: Boolean,
      default: false,
    },
  },
  name: "answerContestComp",
};
</script>

<style lang='scss'>
@import "@/styles/utility/rem.scss";

.answerContest {
  width: rem(750);
  height: rem(495);
  .contents{
    width: 100%;
  background: #ffffff;
  border-radius: rem(16);
  padding: rem(20);
  position: relative; 
  }
  .title {
    font-size: rem(34);
    font-family: PingFang, PingFang-SC-Bold;
    font-weight: bold;
    text-align: left;
    color: #000000;
    line-height: rem(44);
  }
  .info {
    font-size: rem(26);
    font-family: PingFang, PingFang-SC-Medium;
    font-weight: normal;
    text-align: left;
    color: #999999;
    line-height: rem(70);
  }
  .contentOptions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    .optionLeft {
      width: rem(318);
      height: rem(339);
      background: url("../../images/answerRank/answer_cbg1.png");
      background-size: 100% 100%;
      .substance {
        margin-top: rem(38);
        margin-left: rem(24);
        .line {
          width: rem(5);
          height: rem(72);
          background: url("../../images/answerRank/answer_line.png");
          background-size: 100% 100%;
          float: left;
          margin-right: rem(10);
        }
        img {
          width: rem(143);
          height: rem(41);
        }
        p {
          font-size: rem(24);
          font-family: PingFang, PingFang-SC-Medium;
          font-weight: normal;
          text-align: left;
          color: #ffffff;
          //   line-height: rem(150);
        }
      }
    }
    .optionRight {
      display: flex;
      flex-direction: column;
      div {
        width: rem(324);
        height: rem(160);
        text-align: center;
      }
      .opRightF {
        background: url("../../images/answerRank/answer_cbg2.png");
        background-size: 100% 100%;
        margin-bottom: rem(19);
        img {
          width: rem(143);
          height: rem(41);
          margin-top: rem(37);
        }
      }
      .opRightS {
        background: url("../../images/answerRank/answer_cbg3.png");
        background-size: 100% 100%;
        img {
          width: rem(106);
          height: rem(38);
          margin-top: rem(37);
        }
      }
    }
  }
  .rank {
    width: rem(144);
    height: rem(53);
    line-height: rem(53);
    position: absolute;
    top: rem(30);
    right: rem(19);
    background: url("../../images/answerRank/rank_bg.png");
    background-size: 100% 100%;
    text-align: center;
    @include font-color($mainColor);
    img {
      width: rem(17);
      height: rem(19);
    }
  }
}
</style>